<template>
  <!-- 点 -->
  <div class="city">
    <div class="dotted"></div>
    <div class="pulse1"></div>
    <div class="pulse2"></div>
    <div class="pulse3"></div>
  </div>
</template>

<script>
  export default {
    name: 'Point',
    props: {
      width: {
        type: String,
        default: '100%'
      },
      height: {
        type: String,
        default: ''
      }
    },
    data() {
      return {}
    },
  }
</script>

<style scoped>
.city {
  position: relative;
  width: 48px;
  height: 48px;
  color: #fff;
}

.dotted {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  background-color: #09f;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.city div[class^="pulse"] {
  /* 保证我们小波纹在父盒子里面水平垂直居中 放大之后就会中心向四周发散 */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  box-shadow: 0 0 10px #009dfd;
  border-radius: 50%;
  animation: pulse 1.6s linear infinite;
}

.city div.pulse2 {
  animation-delay: 0.8s;
}

.city div.pulse3 {
  animation-delay: 1.2s;
}

@keyframes pulse {
  0% {}
  70% {
    /* transform: scale(5);  我们不要用scale 因为他会让 阴影变大*/
    width: 30px;
    height: 30px;
    opacity: 1;
  }
  100% {
    width: 48px;
    height: 48px;
    opacity: 0;
  }
}
</style>
